﻿<ResourceDictionary
	xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
	xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
    xmlns:vm="clr-namespace:MoneyManagerNET.Presentation.ViewModel;assembly=MoneyManagerNET.Presentation.ViewModel"
    xmlns:fix="clr-namespace:MoneyManagerNET.Presentation.Infrastructure;assembly=Mvvm"
    xmlns:binding="clr-namespace:MoneyManagerNET.Presentation.Infrastructure.Binding;assembly=Mvvm"
    >
    <binding:WrapConverter x:Key="wrapper"></binding:WrapConverter>
    
    <SolidColorBrush x:Key="TabControlNormalBorderBrush" Color="#8C8E94"/>
	<Style x:Key="TabControlHideHeaders" TargetType="{x:Type TabControl}">
		<Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}"/>
		<Setter Property="Padding" Value="4,4,4,4"/>
		<Setter Property="BorderThickness" Value="1"/>
		<Setter Property="BorderBrush" Value="{StaticResource TabControlNormalBorderBrush}"/>
		<Setter Property="Background" Value="#F9F9F9"/>
		<Setter Property="HorizontalContentAlignment" Value="Center"/>
		<Setter Property="VerticalContentAlignment" Value="Center"/>
		<Setter Property="Template">
			<Setter.Value>
				<ControlTemplate TargetType="{x:Type TabControl}">
					<Grid ClipToBounds="true" SnapsToDevicePixels="true" KeyboardNavigation.TabNavigation="Local">
						<Grid.ColumnDefinitions>
							<ColumnDefinition x:Name="ColumnDefinition0"/>
							<ColumnDefinition x:Name="ColumnDefinition1" Width="0"/>
						</Grid.ColumnDefinitions>
						<Grid.RowDefinitions>
							<RowDefinition x:Name="RowDefinition0" Height="Auto"/>
							<RowDefinition x:Name="RowDefinition1" Height="*"/>
						</Grid.RowDefinitions>
						<TabPanel x:Name="HeaderPanel" Grid.Column="0" IsItemsHost="true" Margin="2,2,2,0" Grid.Row="0" KeyboardNavigation.TabIndex="1" Panel.ZIndex="1" Visibility="Collapsed"/>
						<Border x:Name="ContentPanel" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" Grid.Column="0" KeyboardNavigation.DirectionalNavigation="Contained" Grid.Row="1" KeyboardNavigation.TabIndex="2" KeyboardNavigation.TabNavigation="Local">
							<ContentPresenter x:Name="PART_SelectedContentHost" ContentSource="SelectedContent" Margin="{TemplateBinding Padding}" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"/>
						</Border>
					</Grid>
					<ControlTemplate.Triggers>
						<Trigger Property="TabStripPlacement" Value="Bottom">
							<Setter Property="Grid.Row" TargetName="HeaderPanel" Value="1"/>
							<Setter Property="Grid.Row" TargetName="ContentPanel" Value="0"/>
							<Setter Property="Height" TargetName="RowDefinition0" Value="*"/>
							<Setter Property="Height" TargetName="RowDefinition1" Value="Auto"/>
							<Setter Property="Margin" TargetName="HeaderPanel" Value="2,0,2,2"/>
						</Trigger>
						<Trigger Property="TabStripPlacement" Value="Left">
							<Setter Property="Grid.Row" TargetName="HeaderPanel" Value="0"/>
							<Setter Property="Grid.Row" TargetName="ContentPanel" Value="0"/>
							<Setter Property="Grid.Column" TargetName="HeaderPanel" Value="0"/>
							<Setter Property="Grid.Column" TargetName="ContentPanel" Value="1"/>
							<Setter Property="Width" TargetName="ColumnDefinition0" Value="Auto"/>
							<Setter Property="Width" TargetName="ColumnDefinition1" Value="*"/>
							<Setter Property="Height" TargetName="RowDefinition0" Value="*"/>
							<Setter Property="Height" TargetName="RowDefinition1" Value="0"/>
							<Setter Property="Margin" TargetName="HeaderPanel" Value="2,2,0,2"/>
						</Trigger>
						<Trigger Property="TabStripPlacement" Value="Right">
							<Setter Property="Grid.Row" TargetName="HeaderPanel" Value="0"/>
							<Setter Property="Grid.Row" TargetName="ContentPanel" Value="0"/>
							<Setter Property="Grid.Column" TargetName="HeaderPanel" Value="1"/>
							<Setter Property="Grid.Column" TargetName="ContentPanel" Value="0"/>
							<Setter Property="Width" TargetName="ColumnDefinition0" Value="*"/>
							<Setter Property="Width" TargetName="ColumnDefinition1" Value="Auto"/>
							<Setter Property="Height" TargetName="RowDefinition0" Value="*"/>
							<Setter Property="Height" TargetName="RowDefinition1" Value="0"/>
							<Setter Property="Margin" TargetName="HeaderPanel" Value="0,2,2,2"/>
						</Trigger>
						<Trigger Property="IsEnabled" Value="false">
							<Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}"/>
						</Trigger>
					</ControlTemplate.Triggers>
				</ControlTemplate>
			</Setter.Value>
		</Setter>
	</Style>
	<vm:TransactionStatusConverter x:Key="trStCvt"/>
	<fix:Boolean2VisibilityConverter x:Key="bool2vis"/>

    
    <Style TargetType="{x:Type Control}" x:Key="ControlBaseStyle">
		<Setter Property="Margin" Value="5"/>
		<Setter Property="VerticalAlignment" Value="Center"/>
	</Style>
    <Style TargetType="{x:Type DatePicker}" BasedOn="{StaticResource ControlBaseStyle}"/>
	<Style TargetType="{x:Type TextBox}" BasedOn="{StaticResource ControlBaseStyle}"/>
	<Style TargetType="{x:Type Button}" BasedOn="{StaticResource ControlBaseStyle}">
		<Setter Property="MinWidth" Value="60"/>
	</Style>
	<Style TargetType="{x:Type Label}" BasedOn="{StaticResource ControlBaseStyle}"/>
	<Style TargetType="{x:Type ComboBox}" BasedOn="{StaticResource ControlBaseStyle}"/>
	<Color x:Key="Green">#FF0A890A</Color>
	<Color x:Key="Edit">#FFC2710F</Color>
	<Color x:Key="Red">Red</Color>





<!-- Tooltip-->
    <LinearGradientBrush x:Key="LightBrush" StartPoint="0,0" EndPoint="0,1">
        <GradientBrush.GradientStops>
            <GradientStopCollection>
                <GradientStop Color="Red" Offset="0.0"/>
                <GradientStop Color="#EEE" Offset="1.0"/>
            </GradientStopCollection>
        </GradientBrush.GradientStops>
    </LinearGradientBrush>

    <SolidColorBrush x:Key="SolidBorderBrush" Color="#888" />
    <Style x:Key="{x:Type ToolTip}" TargetType="ToolTip">
        <Setter Property="OverridesDefaultStyle" Value="true"/>
        <Setter Property="HasDropShadow" Value="True"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="ToolTip">
                    <Border Name="Border"
          Background="{StaticResource LightBrush}"
          BorderBrush="{StaticResource SolidBorderBrush}"
          BorderThickness="1"
          Width="{TemplateBinding Width}"
          Height="{TemplateBinding Height}">
                        <ContentPresenter
            Margin="4" 
            HorizontalAlignment="Left"
            VerticalAlignment="Top" />
                    </Border>
                    <ControlTemplate.Triggers>
                        <Trigger Property="HasDropShadow" Value="true">
                            <Setter TargetName="Border" Property="CornerRadius" Value="4"/>
                            <Setter TargetName="Border" Property="SnapsToDevicePixels" Value="true"/>
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>















    <!--<Style x:Key="{x:Type ToolTip}" TargetType="TextBox">

        <Setter Property="Validation.ErrorTemplate">
            <Setter.Value>
                <ControlTemplate>
                    <StackPanel Orientation="Vertical">
                        <Border>
                            <AdornedElementPlaceholder  x:Name="adorner"/>
                        </Border>
                        <TextBlock Height="20" Margin="10 0" Text="{Binding ElementName=adorner, Path=AdornedElement.(Validation.Errors)[0].ErrorContent}"/>
                    </StackPanel>
                </ControlTemplate>
            </Setter.Value>
        </Setter>


        <Style.Triggers>
            <Trigger Property="Validation.HasError" Value="True">
                <Setter Property="ToolTip"
                Value="{Binding RelativeSource={RelativeSource Self}, Path=(Validation.Errors)[0].ErrorContent}">
                </Setter>
            </Trigger>
        </Style.Triggers>

        
    </Style>-->
    <!-- Resource dictionary entries should be defined here. -->
</ResourceDictionary>